The class maintaines a list of items which rely on the AnyItem interface. Classes which implement this
interface, e.g. LSAWebPageItem, provide the accessors to the attribute "key" and to the methods "implode"
and "explode".
Because this kind of interface is used the items cannot be instantiated in this class. To add a new item to the
list the item has to be instantiated from outside and passed in as parameter.
'
- Version:
-
1.2.5, 19.SEP.2000
<BR>
- History:
| 19.SEP.2000 | RGR | errorhandling in add item improved
|
| 11.AUG.2000 | RGR | Validation added in updateCurrentItem
|
| 27.JUL.2000 | RGR | new function updateAllItems
|
| 27.JUL.2000 | RGR | getItemByKey method changed
|
Public Property Set CurrentItemKey AsString
Points to an item of the list. Is used to navigate through the list
Public Property Get CurrentItemKey AsString
Public Property Set DefaultItemKey AsString
Points to an item of the list. One Element can be marked as default item.
Public Property Get DefaultItemKey AsString
Public Property Set FirstItemKey AsString
Points to the first item of the list
Public Property Get FirstItemKey AsString
Public Property Get Count AsInteger
Delivers the number of elements of the maintained list
Public Property Set ListDelimiter AsString
When the object is imploded to a serial data string this character will be used as seperator.
If the programmer doesn't set a delimiter a default value will be delivered by the class.
Public Property Get ListDelimiter AsString
New
Public Sub New
Initiates the counter to the value 0 and sets the default for the delimiter.
Delete
Public Sub Delete
This is the standard destructor of the class
AddItem
Public Sub AddItem(NewItem As Variant)
Adds a new item to the list. The position in the list of the new item
is after the item marked as current item.
- Parameters:
| newItem | AnyItem | the item which is added to the list
|
- Errors:
- History:
| 19.SEP.2000 | RGR | set ErrPrm for dublicate keys
|
ClearCurrentItem
Public Sub ClearCurrentItem
Deletes the item at which the CurrentItemKey is
pointing at from the list. If FirstItem or DefaultItem is set to
the item which should be deleted the pointers are set to the
next item in the list.
ClearAllItems
Public Sub ClearAllItems
Reinitialize the list.
GetItemByKey
Public Sub GetItemByKey(ItemKey As String,TargetItem As Variant,MoveCurrentKey As Integer)
Gets an item from the list by its key.
Because the class doesn't know what kind of item is maintained in the list, it cannot
create new instances. Therefore the result item (TargetItem) has to be provided by
calling function. This function will return the item with defined key. If the item cannont be
found an eempty object (Nothing) is returned. If the parameter MoveCurrentKey is
set to true, the CurrentItemKey property will point to the found key after execution.
- Parameters:
| itemKey | String | key of the item which is searched
|
| targetItem | AnyItem | item to store the result
|
| moveCurrentKey | Boolean | if true CurrentItemKey = ItemKey after search
|
- History:
| 27.JUL.2000 | RGR | Returns empty if item cannot be found
|
GetNextItemKey
Public Function GetNextItemKey As String
Returns the key of the item next to the item
at which the CurrentItemKey attribute is pointing. If no elements
are in the list an empty string("") is returned.
GetPreviousItemKey
Public Function GetPreviousItemKey As String
Returns the key of the item previous to the item
at which the CurrentItemKey attribute is pointing. If no elements
are in the list an empty string("") is returned.
updateCurrentItem
Public Sub updateCurrentItem(updateItem As Variant)
Updates the item at which the CurrentItemKey attribute is pointing
with the values of the item, passed in as parameter
- Parameters:
| updateItem | Variant | the item which is used for the update
|
- History:
| 11.AUG.2000 | RGR | Validation added in updateCurrentItem
|
refreshAllItems
Public Sub refreshAllItems(ModelItem As Variant)
Updates all items in the list, which means that the formatted properties
of all items are refeshed.
implodeToArray
Public Function implodeToArray As Variant
Returns an array with the serialized item objects
as values. Each element will be extended with the information
if it is the default value or not
implodeToSerialData
Public Function implodeToSerialData As String
Returns a serial data string with the serialized item objects as datablocks.
- Errors:
| ErrItemDelimiterDoesntMatch | thrown if items use different delimiters
|
GetNthPositionArray
Public Function GetNthPositionArray(pos As Integer) As Variant
Extracts nth position from the serial data array
which is build by the implodeToArray method
- Parameters:
| pos | Integer | the column which should be extracted
|
- Errors:
| ErrDataDoesntCorrespondToObject | |
IsElementByKey
Public Function IsElementByKey(queryKey As String) As Integer
Checks if an element with the key queryKey is an element of the list.
| Top | LotusScript Doc |
| © Lotus Professional Services |
| generated on : 05-Apr-01 8:40:00 AM |